package com.itheima.test02;

public class Test04 {
    public static void main(String[] args) {
        int i=10;
        //int -> String
        String s=i+"";
        String s1 = String.valueOf(i);
        String s2 = Integer.valueOf(i).toString();
        System.out.println(s);
        System.out.println(s1);
        System.out.println(s2);

        //String -> int
        String s3= "123";
        int i1 = Integer.parseInt(s3);
        int i2 = Integer.valueOf(s3).intValue();
        int i3 = new Integer(s3).intValue();
        System.out.println(i1);
        System.out.println(i2);
        System.out.println(i3);
    }
}
